package com.zkthink.ceres.promotion.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.PageList;
import com.zkthink.base.R;
import com.zkthink.base.service.SuperService;
import com.zkthink.ceres.promotion.dto.PromotionAdminDTO;
import com.zkthink.ceres.promotion.dto.PromotionSaveDTO;
import com.zkthink.ceres.promotion.entity.Promotion;
import com.zkthink.ceres.promotion.vo.admin.PromotionAdminPageVO;
import com.zkthink.ceres.promotion.vo.admin.PromotionAdminVO;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 业务接口
 * 营销活动后台接口
 * </p>
 *
 * @author kellen
 * @date 2020-06-16
 */
public interface PromotionAdminService extends SuperService<Promotion> {

	/**
	 * 新增营销活动
	 * @param promotion
	 * @return
	 */
	R<Boolean> addPromotion(Promotion promotion);

	/** 查询活动接口
	 * @author 善泉 2020/6/17 21:13
	 * @return
	 */
	R<PromotionAdminPageVO> findAdminPromotionList(PromotionAdminDTO req);

	/**
	 * 定时器更新活动的状态
	 * @return
	 */
	R<Boolean> updatePromotionStatus();

	R updatePromotion(Promotion promotionEntity);

	/**
	 * 结束活动
	 * @param promotionEndIdList
	 * @param endTime
	 */
	void endPromotion(List<Long> promotionEndIdList, LocalDateTime endTime);
}
